package cn.wizzer.app.user.modules.services.account;

import cn.wizzer.app.user.modules.models.UserWithdraw;
import cn.wizzer.app.user.modules.models.dto.ElephantWithdrawDTO;
import cn.wizzer.app.user.modules.models.dto.GlobalPayWithdrawDTO;
import cn.wizzer.app.user.modules.models.dto.XindovndWithdrawDTO;
import cn.wizzer.app.user.modules.models.enums.WithdrawChannel;
import cn.wizzer.app.user.modules.models.vo.UserWithdrawVO;
import cn.wizzer.framework.base.service.BaseService;
import cn.wizzer.framework.page.Pagination;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface UserWithdrawService extends BaseService<UserWithdraw> {
    /**
     * 分页方法
     * 加了统计查询，参数如果右边 searchSum 也需要调整
     *
     * @param currencyId
     * @param status
     * @param searchDate
     * @param searchKeyword
     * @param pageNumber
     * @param pageSize
     * @return
     */
    Pagination listPage(String conditionData, String currencyId, String status, String[] searchDate, String searchKeyword, WithdrawChannel channel, int pageNumber, int pageSize);

    /**
     * 根据搜索条件查询
     *
     * @param conditionData
     * @param currencyId
     * @param status
     * @param searchDate
     * @param searchKeyword
     * @param channel
     * @return
     */
    Map<String, BigDecimal> searchSum(String conditionData, String currencyId, String status, String[] searchDate, String searchKeyword, WithdrawChannel channel);

    /**
     * @param id
     * @param remark
     * @param sure
     * @param channel
     * @param platformUid
     * @param requestUrl  请求地址，根据不同的地址判断，给出不同的回调地址
     * @return
     * @throws Exception
     */
    UserWithdraw examine(String id, String remark, Boolean sure, WithdrawChannel channel, String platformUid, String requestUrl) throws Exception;

    UserWithdraw add(WithdrawChannel channel, String currencyId, BigDecimal amount, String toUser, String cardId) throws Exception;

    void manual(String currencyId, BigDecimal amount, String toUser, String cardId, String platformUid, WithdrawChannel channel) throws Exception;

    UserWithdrawVO detail(String id);

    String oneWalletNotify(String respBody) throws Exception;

    void cancel(String id, String remark, String platformUid);

    UserWithdraw xindovndNotify(XindovndWithdrawDTO xin) throws Exception;

    /**
     * 大象支付代付
     *
     * @param elephant
     * @return
     * @throws Exception
     */
    UserWithdraw elephantNotify(ElephantWithdrawDTO elephant) throws Exception;

    /**
     * globalPay代付
     *
     * @param globalPay
     * @return
     */
    UserWithdraw globalPayNotify(GlobalPayWithdrawDTO globalPay) throws Exception;

    /**
     * 获取提现方式
     *
     * @param bankLibId 银行id
     * @return
     */
    List<String> getWithdrawalMethod(String bankLibId);
}
